[IA64] Use key in optimzation feature
authorAlex Williamson <alex.williamson@hp.com>
Mon, 30 Jul 2007 22:10:17 +0000 (16:10 -0600)
committerAlex Williamson <alex.williamson@hp.com>
Mon, 30 Jul 2007 22:10:17 +0000 (16:10 -0600)
Added IA64_INST_KEY_MISS_VECTOR and IA64_DATA_KEY_MISS_VECTOR to
ia64_handle_reflection.  Added using the key in handling
XEN_IA64_OPTF_IDENT_MAP_REG7 in PV.

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
xen/arch/ia64/xen/faults.c
xen/arch/ia64/xen/vcpu.c

index f2ddb66af7973cc97824ca0c129955b8a2b780c4..cebc7cea7f1ae90297ebf0802318099fb0498d4b 100644 (file)
@@ -572,6 +572,12 @@ ia64_handle_reflection(unsigned long ifa, struct pt_regs *regs,
        BUG_ON(!(psr & IA64_PSR_CPL));
 
        switch (vector) {
+       case 6:
+               vector = IA64_INST_KEY_MISS_VECTOR;
+               break;
+       case 7:
+               vector = IA64_DATA_KEY_MISS_VECTOR;
+               break;
        case 8:
                vector = IA64_DIRTY_BIT_VECTOR;
                break;
index a250efef187a57186b62ae3e362e63cc70a90099..f3e1a4b3493e0e25cee6f8e05d063d9db9276cdd 100644 (file)
@@ -1623,7 +1623,7 @@ IA64FAULT vcpu_translate(VCPU * vcpu, u64 address, BOOLEAN is_data,
                         u64 * pteval, u64 * itir, u64 * iha)
 {
        unsigned long region = address >> 61;
-       unsigned long pta, rid, rr;
+       unsigned long pta, rid, rr, key = 0;
        union pte_flags pte;
        TR_ENTRY *trp;
 
@@ -1716,6 +1716,7 @@ IA64FAULT vcpu_translate(VCPU * vcpu, u64 address, BOOLEAN is_data,
                    region == 7 && ia64_psr(regs)->cpl == CONFIG_CPL0_EMUL) {
                        pte.val = address & _PAGE_PPN_MASK;
                        pte.val = pte.val | optf->im_reg7.pgprot;
+                       key = optf->im_reg7.key;
                        goto out;
                }
                return is_data ? IA64_ALT_DATA_TLB_VECTOR :
@@ -1741,7 +1742,7 @@ IA64FAULT vcpu_translate(VCPU * vcpu, u64 address, BOOLEAN is_data,
 
        /* found mapping in guest VHPT! */
 out:
-       *itir = rr & RR_PS_MASK;
+       *itir = (rr & RR_PS_MASK) | (key << IA64_ITIR_KEY);
        *pteval = pte.val;
        perfc_incr(vhpt_translate);
        return IA64_NO_FAULT;